1. Field of the Invention
This invention relates to a contour-information extraction apparatus and method, and more particularly, to an apparatus and method for extracting contour vectors of a binary image input in a sequence of raster scanning.
2. Description of the Related Art
The assignee of the present application has proposed, in U.S. application Ser. No. 08/161,082, filed Dec. 3, 1993, a contour-forming apparatus the contents of which are hereby incorporated by reference into the present invention.
In this application target pixel (picture element) is selected, and it is determined if the target pixel is a contour pixel, in accordance with a state of the target pixel and a plurality of pixels in the vicinity thereof. When the target pixel is determined to be a contour pixel, a horizontal vector and a vertical vector are extracted around the target pixel in accordance with the state of the target pixel and the pixels in the vicinity thereof based on the relationship between the target pixel and the pixels in the vicinity thereof.
In this approach, since all contour lines within an image can be extracted in a single raster scanning operation, it is unnecessary to provide an image memory for storing all input image data. As a result, the capacity of a memory for storing input image data is reduced. Furthermore, by extracting contour vectors connecting adjacent interpixel grids, instead of in central positions of pixels (i.e., by assuming that each pixel has the shape of a square having vectors at four sides thereof), contour lines having a significant width can be extracted, even for a fine line having a width of one pixel.
There is also a description in U.S. application Ser. No. 08/161,082 of extracting contour points in a 9-pixel region comprising 3xc3x973 pixels in an original image.
In this case, each of two contour points connecting two black pixels positioned in an oblique direction are defined every time one of the two black pixels is selected as a target pixel. According to this approach, extraction of contour pixels around a target pixel can be performed independently of the state of other surrounding pixels.
However, the above-described invention has the following problems:
(1) In order to realize extraction of contour points in a 9-pixel region comprising 3xc3x973 pixels, it is necessary to determine whether each of the 3xc3x973 pixels around a target pixel within a 9-pixel region is a black pixel or a white pixel. At that time, since the contents of processing are determined for each pixel-state pattern, it is desirable that the number of pixel-state patterns be as small as possible.
(2) There are four positions where a contour point can be present for a target pixel within a 9-pixel region comprising 3xc3x973 pixels. As a result, processing for each pixel state is complicated, and therefore it is difficult to create a processing module.
(3) A stack method is adopted in which in order to hold a number of each vector having an undetermined connection relationship, each vector number is registered in a table in the sequence of extraction, and registered vector numbers are retrieved in an upstream direction starting with the last registered vector number. Hence, a memory having a large capacity must be used, and as a result, a great deal of time is required for retrieval.
It is an object of the present invention to provide a contour-information extraction system having a simplified configuration and simplified processing procedures for extracting contour vectors from image data. It is a further object of the invention to provide a contour-information extraction system having a decreased size and cost and an increased processing speed.
It is another object of the present invention to provide a contour-information extraction apparatus and a method in which processing speed is increased by reducing the scale and the cost of processing circuitry and by reducing unnecessary memory accessing operations.
It is still another object of the present invention to provide a contour-information extraction apparatus and method in which the capacity of a memory for storing extracted contour vector data is reduced, and in which the cost of the apparatus is correspondingly reduced.
According to one aspect, the present invention is a contour-information extraction apparatus which includes detection means for performing raster scanning of a document, for determining a position of an interpixel grid of image data in the document, for detecting contour vectors for the interpixel grid in a main scanning direction and for detecting contour vectors for the interpixel grid in a sub-scanning direction. Contour vectors being detected based on a state of a group of pixels in a vicinity of the position of the interpixel grid. Determination means determines a connection state of the detected contour vectors, and extraction means extracts contour information for the interpixel grid of image data based on the connection state of the contour vectors.
According to another aspect, the present invention is a contour-information extraction method which includes performing raster scanning of a document, determining a position of an interpixel grid of image data in the document, detecting contour vectors for the interpixel grid in a main scanning direction, and detecting contour vectors in a sub-scanning direction for the interpixel grid based on a state of a group of pixels in a vicinity of the position of the interpixel grid. The contour vectors are detected based on a state of a group of pixels in a vicinity of the interpixel grid. A connection state of the detected contour vectors is determined, and contour information for the interpixel grid is extracted based on the connection state of the contour vectors.
According to another aspect, the present invention is a contour-information extraction apparatus which includes detection means for performing raster scanning of a document, for determining a position of an interpixel grid of image data in the document, and for detecting one of contour vectors for the interpixel grid in a main scanning direction and contour vectors in a sub-scanning direction for the interpixel grid. The contour vectors are detected based on a state of a group of pixels in a vicinity of the position of the interpixel grid. Determination means determines a connection state of the detected contour vectors, and extraction means extracts contour information for the image data based on the connection state of the contour vectors.
According to another aspect, the present invention is a contour-information extraction method which includes performing raster scanning of a document, determining a position of an interpixel grid of image data in the document, detecting contour vectors for the interpixel grid in one of a main scanning direction and a sub-scanning direction. The contour vectors are detected based on a state of a group of pixels in a vicinity of the position of the interpixel grid. A connection state of the detected contour vectors is determined, and contour information for the image data is extracted based on the connection state of the contour vectors.
The foregoing and other objects, advantages and features of the present invention will become more apparent from the following description of the preferred embodiments taken in conjunction with the accompanying drawings.